home *** CD-ROM | disk | FTP | other *** search
-
-
- Dec 23, 1991 Page 1
-
-
-
- FIND.EXE Version 1.30
-
- FIND Version 1.30 is a MS-DOS (tm) tool for file maintenance.
- Its roots began in UNIX (tm). FIND can be used as a stand
- alone tool or embedded into a batch program to maintain file
- systems. FIND V1.30 is not only used to locates files but can
- be used to execute other programs.
-
- FIND V1.30 recursively works its way down the directory
- hierarchy to locate files. It can find files by name, type,
- size, age, or a combination of name, type, size or age. Once
- found, the file can be printed or be part of an execution
- command. Included in batch files, FIND V1.30 is useful for
- removing old files in TMP directories or old BAK files. Since
- find can determine age, find can be used in batch files to run
- utilities periodically.
-
- FIND V1.30 is faster and has been enhanced with new features
- as well as bug fixes. FIND V1.30 can look for files not
- matching a pattern or patterns. FIND V1.30 can print out a
- count of matching files as well as the total file size. Commands
- that take an argument after the file name, such as del file /p
- can now be executed. Path and file names are now printed in
- lower case.
-
- Files included in the archive are:
-
- find.me This file
- find.exe find exec file
- batch.bat an example of find used in a batch file
- readme.txt read me file
-
- USE:
-
- find <dir lst> [!] -name <name lst> -type <ahrs> -size n
- -mtime d \ -print -exec <cmd> -count -du
-
- <dir lst> is a list of one or more path names.
-
- -name <name lst> is true if a file in the name list matches
- a file in the directory list. Wildcard
- characters (* and ?) are allowed.
- Preceding -name with a ! character, cause
- the list to look for files that do not
- match the name list.
-
- -type ahrs is true if the file is type c, where c is
- a for archived, h for hidden, r for
- readonly or s for system. Using two or
- more file types is treated as an assumed
- AND operation. For example, -type hs will
- find files that are hidden system files.
-
-
-
-
-
- Dec 23, 1991 Page 2
-
-
-
- -size n is true if the file is n character
- +n means larger than n characters and
- -n means smaller than n characters.
- n means exactly n characters.
-
- -mtime d is true if the file is d days old. Where
- +d means older than d days
- -d means newer than d days
- d means exactly d days.
-
- -print prints the path and file name.
-
- -exec <cmd> executes cmd. If arguments are required
- to the command, double quote the command
- and arguments. For example -exec "rm -i"
- will run the UNIX like remove command
- prompting the user for an OK to delete each
- file found.
-
- If arguments are required after the file
- name, such as DEL file /P, use an ampersand
- to mark the location of the file name. The
- command MUST be double quoted. For example
- -exec "del & /p"
-
- -count prints the count of all files found
- matching input criteria.
-
- -du prints the total size in bytes of all file
- matching input criteria.
-
- EXAMPLES
- To remove all files that are older than 6 days in the
- C:\TMP and C;\WIN\TMP paths.
-
- find c:\tmp c:\win\tmp -mtime +6 -exec del
-
- To remove all files that are older than 6 days in the
- C:\TMP and be prompted for an OK to delete.
-
- find c:\tmp -mtime +6 -exec "del & /p"
-
- To find all files ending in .c and .h:
-
- find c:\ -name *.c *.h -print
-
- To find all files not ending in .c and .h:
-
- find c:\ ! -name *.c *.h -print
-
- To count the number of files matching *.C and *.H and
- print the total size in bytes:
-
- find c:\ -name *.c *.h -count -du
-
-
-
-
-
- Dec 23, 1991 Page 3
-
-
-
- Differences between the MS-DOS version and the UNIX version:
- The or operator, -o, is not supported.
-
- Expressions inside () are not supported.
-
- The -exec command does not take a semicolon and
- the path name does not take the {} syntax.
-
- The path list does not support file names.
-
- The -count and -du options are not found in the UNIX
- version.
-
- The ampersand "&" is not found in UNIX.
-
- The following arguments are not supported (generally
- because they are not found in the MS-DOS file
- system.)
-
- -prem -link -user
- -group -atime -ctime
- -ok -depth
-
- There may be other differences that are either unique to UNIX
- or limited by MS-DOS. This version was not intended to be an
- exact replacement for the UNIX version. If you would like
- other feature, please document them and send them to me via
- Compuserve. Please provide me with a description of the
- feature and an example of the command line and the desired
- result(s).
-
- Copyright (c) 1991 by Julian C. Snow. All Rights Reserved.
- Written and uploaded to Compuserve by:
-
- Julian C. Snow
- 4170 N. Marine Dr. #7A
- Chicago, Il 60613
- Compuserve 76176,127
-
- If this program has been useful to you, please register!
- Your input about future enhancements will be highly valued.
- To register, send $5 to the above address. All registrations
- are appreciated.
-
- This program may be distributed freely. If it is distributed,
- this file (find.doc) must be included. The copyright holder
- offers no warranty with this code at all, including its
- fitness for any particular purpose. Neither shall he be
- liable for damages of any kind that may arise from its use.
-
- UNIX is a trademark of AT&T.
- MS-DOS is a trademark of Microsoft Corporation
-
- Julian C. Snow
-